home *** CD-ROM | disk | FTP | other *** search
/ PC Graphics Unleashed / PC Graphics Unleashed.iso / ch01 / new_faq < prev    next >
Text File  |  1994-07-29  |  9KB  |  245 lines

  1. --------------------------------------------------------------------------------
  2.                PART I -- TIPS FOR DIFFERENT OPERATING SYSTEMS
  3. --------------------------------------------------------------------------------
  4.  
  5. (1). WINDOWS (from Oliver Weyand)
  6.     Start Display under WINDOWS through a PIF file. Give display all
  7.     memory you have (parameters -1 for ems and/or xms in pif-editor),
  8.     because you will have no swap-space in a windows-shell (that's
  9.     ok, because windows will manage the virtual memory). Make sure
  10.     NOT to use a graphic driver in protected mode (windows will show
  11.     you one of this boring error messages), so don't add the 'driver ::p'
  12.     statement to your go32 environment.
  13.     With DISPLAY 1.82 or latter, you are not forced to use VESA driver.
  14.  
  15. (2). OS/2 (from Oliver Weyand, chbrin3@nyx.uni-konstanz.de)
  16.     Load a vesa-driver in your autoexec.bat (under OS/2 this file is only
  17.     executed when you open a DOS shell). Don't use 'driver ::p'. Give it
  18.     enough memory: the standard 4MB dpmi-memory are not enough. Open the
  19.     menu for the DOS shell and edit the entries for memory (EMS,XMS,DPMI).
  20.     Also edit the entries for graphic capabilities. If you won't use the
  21.     autoexec.bat file for display's DOS session, enter the name of the used
  22.     batch file. If you don't understand this things refer to your OS/2
  23.     manual. For further hints how to setting up DOS shells under OS/2 refer
  24.     to the hints that can be found on many ftp servers (if you are an OS/2
  25.     user you will know them, i.e. hobbes).
  26.     It was reported to me, that display won't run under OS/2 at all. Sorry
  27.     guys, can't help you. I just tell you what has worked for me with version
  28.     2.1 on my 486/33. BTW, if you search a good viewer-converter for OS/2
  29.     give Joe-View a chance (joevw128 or higher, shareware).
  30.  
  31. (3). Novell DOS 7 (from Oliver Weyand, chbrin3@nyx.uni-konstanz.de)
  32.     When running display under NWDOS 7 there is only one thing that is
  33.     different from MSDOS: the multitasking environment. You have to make
  34.     sure, that display can't use dpmi. So you can either type 'dpmi off'
  35.     at the NWDOS prompt or add the nodpmi statement to the go32 variable
  36.     (set go32=nodpmi ...) in the runme.bat. Because the NWDOS multitasker
  37.     supports only standart VGA mode you should use display not in graphics-
  38.     text mode (if you do display will switch to plain text after an error
  39.     message). Further the only available graphics mode is 320x200-8bit.
  40.     You can convert files or generate movies in the backround, while you
  41.     play a your favourite game (beware, that you need at least a 486 with
  42.     at least 8-16MB RAM). Because I use NWDOS on a stand-alone machine I
  43.     can't say anything about using display with Netware-Lite.
  44.  
  45. (4). LINUX
  46.     If someone knows anything about the dos-shell of linux please fill in
  47.     here. Because there are other good graphic programs running under X11
  48.     I'm not sure if there is need to run display under linux. But anyway, if
  49.     someone has done it please write, post, e-mail.
  50.  
  51. --------------------------------------------------------------------------------
  52.                             PART II -- OTHER FAQS
  53. --------------------------------------------------------------------------------
  54.  
  55. Q: How can I convert group of 24-bit images to 8-bit images with the same
  56.    palette table ?
  57.  
  58. A: Use the following steps:
  59.    1. Find a palette table:
  60.         Tag the images you want. Select 'accumulation quantization' to
  61.         produce a palette table.
  62.         - or -
  63.         press F5, then 'load a palette table'.
  64.    2. press F4, then change 'number of colors option' to 'no effect'.
  65.    3. press F5, then select 'push palette table'.
  66.    4. Tag the image you want. Select 'batch conversion' with two special
  67.       effects:
  68.       (1) 'pop palette table'
  69.       (2) 'color quantization' with 'current palette' option.
  70.  
  71.  
  72. Q: How can I view the original palette table of an image ?
  73.  
  74. A: press F4, then change 'number of colors option' to 'no effect'.
  75.  
  76.  
  77. Q: How can I resize image using percentage ?
  78.  
  79. A: Just add '%' to end of number, like '120%'.
  80.  
  81.  
  82. Q: Why does this program show the message, 'CPU must be in real mode' ?
  83.  
  84. A: It is likely that you have 'device=emm386.exe noems' in config.sys.
  85.    Remove 'noems'.
  86.  
  87. Q: What is 'response file' ?
  88.  
  89. A: Response file is used to overcome the 128-byte limit in command line
  90.    length. You can put anything in response file just as in command line.
  91.    For example, you can put the following lines in IMAGE.LST :
  92.  
  93. aaa.gif
  94. bbb.jpg
  95. ccc.bmp
  96.  
  97.    then use 'DISPlAY --slide @IMAGE.LST' to do slide show.
  98.  
  99. Q: What is 'description file' ?
  100.  
  101. A: Desciprtion file is a file containing the description for each image
  102.    in current directory. It can help you remember what is in each image.
  103.    You can change the file name to whatever you want (Please read the
  104.    TEXT section in config.dis).
  105.    Please see PART III for the format.
  106.    
  107. Q: What files are needed for minimal usage ?
  108.  
  109. A: The minimal set of needed files is :
  110.    GO32.EXE, DISPLAY.EXE, RUNME.BAT, one Video Driver, CONFIG.DIS,
  111.    EMU387(if you don't have x87), Fonts(if you want contact sheet).
  112.    Any thing else can be deleted.
  113.  
  114. --------------------------------------------------------------------------------
  115.                          PART III -- SOME FILE FORMATS
  116. --------------------------------------------------------------------------------
  117.  
  118. Palette File Format
  119. -------------------
  120.  
  121.   offset  length  content
  122.  
  123.   0       8       "DISPpal0"
  124.   8       4       number of colors(Intel order).
  125.   12      4       R,G,B,A for each color.
  126.   ...     ...     ......
  127.  
  128.  
  129.  
  130. YUV Format (from Berkeley MPEG ENCODER package)
  131. ----------
  132.  
  133. The U and V components are subsampled 4:1.
  134.  
  135. To give you an idea of what format the YUV file must be in, the following
  136. code will read in a YUV file:
  137.  
  138.     unsigned char **y_data, **cr_data, **cb_data;
  139.  
  140.     void          ReadYUV(char *fileName, int width, int height)
  141.     {
  142.     FILE *fpointer;
  143.     register int y;
  144.  
  145.     /* should allocate memory for y_data, cr_data, cb_data here */
  146.  
  147.     fpointer = fopen(fileName, "r");
  148.  
  149.     for (y = 0; y < height; y++)            /* Y */
  150.         fread(y_data[y], 1, width, fpointer);
  151.  
  152.     for (y = 0; y < height / 2; y++)            /* U */
  153.         fread(cb_data[y], 1, width / 2, fpointer);
  154.  
  155.      for (y = 0; y < height / 2; y++)            /* V */
  156.          fread(cr_data[y], 1, width / 2, fpointer);
  157.  
  158.     fclose(fpointer);
  159.     }
  160.  
  161.  
  162.  
  163. Raw RGB Format
  164. --------------
  165.  
  166.   for (y = 0; y < height; ++y)
  167.     for (x = 0; x < width; ++x) {
  168.       read RED;        /* 1 byte */
  169.       read GREEN;    /* 1 byte */
  170.       read BLUE;    /* 1 byte */
  171.     }
  172.  
  173.  
  174.  
  175. Raw GREY Format
  176. ---------------
  177.  
  178.   for (y = 0; y < height; ++y)
  179.     for (x = 0; x < width; ++x)
  180.       read GREY;        /* 1 byte */
  181.  
  182.  
  183.  
  184. Contact Sheet Script File Format
  185. --------------------------------
  186.  
  187.   1. Lines start with # are comment lines.
  188.   2. You must add this string to start of the file : "contact_sheet". This
  189.      string is an ID of script file.
  190.   3. You can write up to 2 strings for each image file in script file.
  191.      Each string can be up to 49 characters.
  192.      Strings are separated with the character '|'.
  193.  
  194.      For example : I am 1| You are 2
  195.   4. If possible DISPLAY writes the two strings in the same line.
  196.      For example:  I am 1 You are 2
  197.                          ^ Strings are separated with one SPACE character.
  198.  
  199.      If the total length of two strings is too long, DISPLAY writes the two
  200.      strings in two lines.
  201.      For example:    I am 1
  202.                     You are 2
  203.  
  204.   5. The following is a sample script file:
  205.  
  206. --------Start--------
  207.  
  208. # This is a sample file
  209.  
  210. contact_sheet
  211.  
  212. KIKI-TON.GIF      Kiki's| gif file
  213. N.GIF             Nausicaa| gif file
  214. NAUSICAA.GIF    Another Nausicaa
  215. PORCO.GIF       Porco Rosso
  216. TOTOROS.GIF     Totoros| gif
  217. WOTW1.GIF       |line 2 only
  218.  
  219. --------Stop--------
  220.  
  221.  
  222. Description File Format
  223. -----------------------
  224.  
  225. Format:
  226.  
  227. <filename.ext> <Any string up to 99 characters>
  228.  
  229. For example:
  230.  
  231. aaa.gif  this is aaa.gif
  232. bbb.jpg   I am bbb :-)
  233. cat.bmp Oh! There is a cat in this image.
  234.  
  235.  
  236. Batch Contact Sheet Script File Format
  237. --------------------------------------
  238.  
  239.   1. Lines start with # are comment lines.
  240.   2. You must add this string to start of the file : "batch_contact_sheet".
  241.      This string is an ID of script file.
  242.   3. This file is for command-line use only.
  243.   4. The format of user input string is in 'Contact Sheet Script File Format'.
  244.   5. SHEET.TPL is a documentation file. Read it.
  245.